<?php
namespace app\index\controller;
use cmf\controller\HomeBaseController;

class WebController extends HomeBaseController
{
  	public $cn;
	public function __construct(){
      	
        parent::__construct();
		$this->chek();
    }
    public function chek(){
      	//session('userid', '1002');
      	$conf=cmf_get_option("site_info");
		$uid=session("userid");
		if(!empty($uid)){
          //$this->error("请登陆",$this->url('weixin/index'));
          //如果没有session
          	
		}else{
          //$this->success('进入中',url('weixin/index',array('new'=>1)));
          $host = $_SERVER['HTTP_HOST'];
          $url = $conf['gameurl']."/index/weixin/index.html?new=2";
          header("Location:".$url);exit();
          //如果有session
			
		}
	}
}
